package cn.kgc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 课工场
 * @since 2023/9/3
 */
@RestController
@RequestMapping("client")
@RefreshScope    //  自动刷新注解
public class ConfigClientController {

    @Value("${name}")
    private String name;
    @GetMapping("m1")
    public String method1(){
        return "ConfigClientController ok name = "+name;
    }
}
